import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App.jsx'
import {Provider} from "react-redux";
import store from "./store/index";


//国际化
import { ConfigProvider } from "antd-mobile";
import zhCN from "antd-mobile/es/locales/zh-CN";


// 更改 rem 比例
import 'lib-flexible'
import './index.less';



/* 处理最大宽度 */
(function () {
    const handleMax = function handleMax() {
        let html = document.documentElement,
            root = document.getElementById('root'),
            deviceW = html.clientWidth;
        root.style.maxWidth = "750px";
        if (deviceW >= 750) {
            html.style.fontSize = '75px';
        }
    };
    handleMax();
})();


const root = ReactDOM.createRoot(document.getElementById('root'));

root.render(

    <ConfigProvider locale={zhCN}>
        <Provider store={store}>
            <App/>
        </Provider>
    </ConfigProvider>

);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
